package cn.dlc.com.rmi.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.dlc.com.rmi.server.UserService;

@RestController
@RequestMapping("rmi")
public class ClientController {

	@Autowired
	private UserService userService;
	
	@GetMapping("test")
	public String sayHello(String name) {
		try {
			String result = userService.sayHello(name);
			return result;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
}
